import java.util.Arrays;

public class exercise_5 {

	public static void main(String[] args) {
		int[] array = {11,37,12,72,58};
		int temp;
		for(int i=0;i<array.length-1;i++) {
			for(int j =array.length;j-i-1>0;j--) {
				if(array[i]>array[i+1]) {
					temp = array[i];
					array[i] = array[i+1];
					array[i+1] = temp;
				}//end if
			}//end inner for
		}//end outer for
		System.out.println(Arrays.toString(array));
	}

}
